﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TotalCrytography.Protector;

namespace TotalCrytography.Protector
{
    class eSignature
    {
        public static string createSignature(string plainText, string hashAlgorithm, string xmlPrivateString)
        {
            string strSignature = "";
            if (xmlPrivateString != null)
            {
                strSignature = RSA_Algorithm.signString(plainText, hashAlgorithm, xmlPrivateString);
            }
            return strSignature;
        }

        public static bool checkSignature(string plainText, string hashAlgorithm, string xmlPublicString, string signature)
        {
            return RSA_Algorithm.verifySignature(plainText, hashAlgorithm, xmlPublicString, signature);
        }
    }
}
